<template>
  <div class="main">
    <div class="header">
      <div class="epName">
        {{ info.name }}
        <span class="goBack" @click="$router.go(-1)">返回</span>
      </div>
      <ul class="epClassify">
        <li>
          <p>区域面积：</p>
          <p>{{ info.detail.acreage || "" }}</p>
        </li>
        <li>
          <p>地理位置</p>
          <p>{{ info.address }}</p>
        </li>
        <li>
          <p>GDP（亿元）</p>
          <p>{{ info.detail.gdp }}</p>
        </li>
        <!-- <li>
          <p>财政收入（亿元）：</p>
          <p>{{ info.detail.fiscal }}</p>
        </li> -->
      </ul>
    </div>
    <div class="main_body">
      <el-tabs v-model="activeName">
        <el-tab-pane label="行政区信息" name="info">
          <div class="header_title"></div>
          <div class="table_one">
            <table border="1" padding="0">
              <tr>
                <td>税收要求（万元/亩）</td>
                <td>{{ info.detail.tax }}</td>
                <td>产出强度（万元/亩）</td>
                <td>{{ info.detail.out_power }}</td>
              </tr>
              <tr>
                <td>投资强度（万元/亩）:</td>
                <td>{{ info.detail.invest_power }}</td>
                <td>产业定位</td>
                <td>{{ info.cluster }}</td>
              </tr>
              <tr>
                <td>工业土地均价:</td>
                <td>{{ info.detail.indu_land }}</td>
                <td>商办土地均价:</td>
                <td>{{ info.detail.comm_land }}</td>
              </tr>
              <tr>
                <td>代表企业</td>
                <td
                  class="intriduce"
                  :colspan="3"
                  v-html="info.detail.represent"
                ></td>
              </tr>
              <tr>
                <td class="names">行政区介绍</td>
                <td class="intriduce" :colspan="3" v-html="info.intriduce"></td>
              </tr>
            </table>

            <div class="height_box"></div>
          </div>
        </el-tab-pane>

        <el-tab-pane label="配套环境" name="hj">
          <div class="header_title"></div>
          <div class="table_one">
            <table border="1" padding="0">
              <tr>
                <td class="names">距货运站距离</td>
                <td>{{ info.config.dis_freight }}</td>
                <td class="names">距港口距离</td>
                <td>{{ info.config.dis_port }}</td>
              </tr>
              <tr>
                <td class="names">距高铁距离</td>
                <td>{{ info.config.dis_rail }}</td>
                <td class="names">距机场距离</td>
                <td>{{ info.config.dis_air }}</td>
              </tr>
              <tr>
                <td class="names">公路运输</td>
                <td>{{ info.config.road_trans }}</td>
                <td class="names">铁路运输</td>
                <td>{{ info.config.rail_trans }}</td>
              </tr>
              <tr>
                <td class="names">生活配套</td>
                <td>{{ info.config.live_facility }}</td>
                <td class="names">百货商场</td>
                <td>{{ info.config.market }}</td>
              </tr>
              <tr>
                <td class="names">酒店商务</td>
                <td>{{ info.config.hotel_bus }}</td>
                <td class="names">医疗</td>
                <td>{{ info.config.medical }}</td>
              </tr>
              <tr>
                <td class="names">教育</td>
                <td colspan="3">{{ info.config.education }}</td>
              </tr>
            </table>
          </div>
          <div class="height_box"></div>
        </el-tab-pane>
        <!-- <el-tab-pane label="行政区介绍" name="js">
          <div class="header_title"></div>
          <div class="table_one">
            <table border="1" padding="0">
              <tr>
                <td class="names">行政区介绍</td>
                <td class="intriduce">{{ info.intriduce }}</td>
              </tr>
            </table>
          </div>
          <div class="height_box"></div>
        </el-tab-pane> -->
      </el-tabs>
    </div>
  </div>
</template>
<script>
import { CarrierDetails } from "@api/details";
export default {
  data() {
    return {
      activeName: "info",
      activeMenu: "",
      info: {
        address: "",
        cate: "",
        charge: "",
        cluster: "",
        config: {
          dis_air: "",
          dis_freight: "",
          dis_port: "",
          dis_rail: "",
          education: "",
          hotel_bus: "",
          live_facility: "",
          market: "",
          medical: "",
          rail_trans: "",
          road_trans: "",
        },
        detail: {
          acreage: "",
          actarea: "",
          comm_land: "",
          comm_sup: "",
          fiscal: "",
          gdp: "",
          indu_land: "",
          indu_need: "",
          indu_sup: "",
          invest_power: "",
          out_power: "",
          represent: "",
          tax: "",
        },
        id: 8,
        image: "",
        indevo: {
          base: "",
          carrier: "",
          induenterprise: "",
          innovate: "",
        },
        intriduce: "",
        invest: {
          comm_ele_one: "",
          comm_ele_thr: "",
          comm_ele_two: "",
          comm_water: "",
          highmag: "",
          indu_ele_one: "",
          indu_ele_thr: "",
          indu_ele_two: "",
          indu_water: "",
          middlemag: "",
          resident_ele_one: "",
          resident_ele_thr: "",
          resident_ele_two: "",
          resident_natgas_one: "",
          resident_natgas_thr: "",
          resident_natgas_two: "",
          resident_water_one: "",
          resident_water_thr: "",
          resident_water_two: "",
          sewage: "",
          special_water: "",
          wagelevel: "",
          worker: "",
        },
        jwd: {
          lat: "",
          lng: "",
        },
        level: "",
        name: "",
        phone: "",
      },
    };
  },
  mounted() {
    let id = this.$route.params.id;
    this.getDetail(id);
  },
  methods: {
    async getDetail(id) {
      let res = await CarrierDetails({ id });
      if (res.code && res.code != 0) {
        this.$message.error(res.msg);
      } else {
        this.info = res;
      }
    },
  },
};
</script>
<style lang="less" scoped>
.main {
  width: 100%;
  height: 100%;
  background: #fff;
  text-align: left;
  .header {
    box-sizing: border-box;
    width: 100%;
    height: 260px;
    background: url("~@img/public/bg-img-xzq&cyyq.png") no-repeat center;
    padding: 0 210px;
  }
  .main_body {
    width: 100%;
    height: calc(100% - 260px);
    overflow-y: auto;

    .main-body-area {
      margin: 0 auto;
      width: 1500px;
      height: 100%;
    }
  }
}

.epName {
  padding-top: 40px;
  font-size: 40px;
  font-family: Microsoft YaHei;
  font-weight: bold;
  color: #ffffff;
  line-height: 52px;
  span {
    margin-left: 30px;
    display: inline-block;
    width: 70px;
    height: 30px;
    line-height: 30px;
    background: #f89718;
    opacity: 0.8;
    border-radius: 4px;
    font-size: 16px;
    font-family: Microsoft YaHei;
    font-weight: bold;
    color: #ffffff;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
  }
  .goBack {
    margin-top: 7px;
    float: right;
    width: 100px;
    height: 38px;
    line-height: 38px;
    background: #5889dc;
    font-weight: 400;
    opacity: 1;
  }
}
.epClassify {
  display: flex;
  justify-content: flex-start;

  li {
    flex: auto;
    padding-left: 80px;
    margin-top: 30px;
    position: relative;
    cursor: pointer;
    &::before {
      position: absolute;
      top: 50%;
      left: 0;
      margin-top: -20px;
      display: block;
      content: "";
      width: 1px;
      height: 40px;
      background: #ffffff;
      opacity: 0.5;
    }
    &:first-of-type {
      padding-left: 0;
      &::before {
        opacity: 0;
      }
    }
    p {
      font-size: 20px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: #ffffff;
      line-height: 56px;
      opacity: 0.6;
      white-space: nowrap;
      &:last-child {
        font-size: 22px;
        opacity: 0.9;
      }
    }
  }
}
.header_title {
  padding-top: 30px;
  margin-bottom: 20px;
  font-size: 18px;
  font-family: Microsoft YaHei;
  font-weight: bold;
  color: #333333;
}
table {
  width: 100%;
  border-color: #ddd;
  tr {
    td {
      padding: 0 20px;
      height: 46px;
      line-height: 30px;
      font-size: 14px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: #333333;
    }
  }
  tr.row_header {
    td {
      background: #f7faff;
    }
  }
  tr.row_item {
    td {
      background: #fff;
    }
  }
}
.table_one table {
  border-color: #ddd;
  tr {
    td {
      padding: 0 20px;
      height: 46px;
      line-height: 30px;
      font-size: 14px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: #333333;
    }
    td:nth-of-type(odd) {
      width: 100px;
      background: #ecf6ff;
    }
    td:nth-of-type(even) {
      width: 280px;
    }
    .detail {
      padding: 15px 20px;
      line-height: 22px;
    }
  }
}

.table_one table tr td.img {
  background: #fff;
}
.map {
  margin-top: 30px;
  height: 90%;
  background: #e6e7e7;
  box-shadow: 0px 0px 9px 0px rgba(189, 189, 189, 0.67);
  border-radius: 10px;
}
.bm-view {
  width: 100%;
  height: 100%;
}
// 选项卡样式修改
/deep/ .el-tabs__nav-scroll {
  padding-left: 210px;
}
/deep/.el-tabs__item {
  padding: 0 60px 0 0;
  font-size: 20px;
  font-family: Microsoft YaHei;
  font-weight: 400;
  color: #333333;
  height: 60px;
  line-height: 60px;
}
/deep/.el-tabs__item.is-active {
  font-weight: bold;
  color: #0043b3;
}
/deep/.el-tabs--top .el-tabs__item.is-top:nth-child(2) {
  padding-left: 0px;
}
/deep/.el-tabs__active-bar {
  height: 4px;
  background: #0043b3;
}
/deep/ .el-tabs__nav-wrap {
  box-shadow: 0px 2px 6px 0px rgba(4, 0, 0, 0.1);
}
/deep/ .el-tabs__nav-wrap::after {
  height: 0;
}
/deep/.el-tabs__header {
  margin: 0;
}
/deep/ .el-tab-pane {
  width: 100%;
  height: 100%;
}
/deep/.el-tabs {
  height: 100%;
  .el-tabs__content {
    box-sizing: border-box;
    height: calc(100% - 60px);
    padding: 0px 240px 30px;
    overflow-y: auto;
    scrollbar-color: #767ffe #e9f3ff; //滚动条轨道颜色   滚动条滑块的颜色
    scrollbar-width: 6px;
    scrollbar-width: thin; //thin模式下滚动条两端的三角按钮会消失
    &::-webkit-scrollbar {
      /*滚动条整体样式*/
      width: 10px; /*高宽分别对应横竖滚动条的尺寸*/
      height: 10px;
    }
    &::-webkit-scrollbar-thumb {
      /*滚动条里面小方块*/
      border-radius: 10px;
      background: linear-gradient(0deg, #767ffe, #79aefe);
    }
    &::-webkit-scrollbar-track {
      /*滚动条里面轨道*/
      background: #e9f3ff;
      border-radius: 10px;
    }
  }
}
/deep/ .rel-node-checked {
  box-shadow: 0px 0px 10px #2f48c8;
  animation: none;
}
/deep/ .rel-node-shape-0:hover {
  box-shadow: 0px 0px 10px #2f48c8;
}
/deep/ .rel-node-peel:hover .rel-node {
  box-shadow: 0px 0px 10px #2f48c8;
}

.main .header {
  padding: 0 210px;
}
.height_box {
  height: 30px;
}
@media screen and (min-width: 1366px) and (max-width: 1600px) {
  .main .header {
    padding: 0 20px;
  }
  /deep/ .el-tabs .el-tabs__content {
    padding: 0px 200px 30px;
  }
}
@media only screen and (width: 1366px) {
  .main .header {
    padding: 0 20px;
  }
  /deep/ .el-tabs .el-tabs__content {
    padding: 0px 200px 30px;
  }
}
@media screen and (max-width: 1200px) {
  .main .header {
    padding: 0 20px;
  }
  .epClassify li p {
    font-size: 16px;
  }
  .epClassify li p:last-child {
    font-size: 18px;
  }
  .epClassify li {
    padding: 0 30px;
  }
  /deep/ .el-tabs__nav-scroll {
    padding-left: 30px;
  }
  /deep/ .el-tabs .el-tabs__content {
    padding: 0 30px 30px;
  }
}
.table_one table tr td[data-v-7889d355]:nth-of-type(odd).names {
  width: 60px;
}
.table_one table tr td[data-v-7889d355]:nth-of-type(even).intriduce {
  padding: 30px 30px;
}

</style>
